<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="js/echarts.min.js"></script>
    <div id="main" style="width: 600px; height: 400px"></div>
    <script type="text/javascript">
      document.write("test");
      var myChart = echarts.init(document.getElementById("main"));
      var option = {
        // title: {
        //   text: "这是标题",
        //   left: "center",
        //   //top:"bottom",
        //   textStyle: {
        //     color: "red",
        //     fontstyle: "italic",
        //     fontsize: 18,
        //   },
        // },
        //legend: {
        //left: "rtght",
        //orient: "vertical",
        //top: "bottom",
        //},
        //toolbox: {
        //feature: {
        //saveAsImage: {},
        //restore: {},
        //},
        //},
        grid: [
          {
            left: "7%",
            width: "38%",
            top: "7%",
            height: "60%",
          },
          {
            right: "7%",
            width: "38%",
            top: "7%",
            height: "60%",
          },
        ],
        xAxis: [{ gridIndex: 0, min: 1, max: 20 }, { gridIndex: 1 }],
        yAxis: [{ gridIndex: 0 }, { gridIndex: 1 }],
        series: [
          {
            type: "bar",
            name: "bar",
            data: [1, 2, 3, 4, 5, 6],
            xAxisIndex: 0,
            yAxisIndex: 0,
          },
          {
            type: "line",
            name: "line_number",
            data: [1, 6, 7, 4, 8, 9],
            xAxisIndex: 1,
            yAxisIndex: 1,
          },
        ],
      };
      myChart.setOption(option);
    </script>
  </body>
</html>
